#include <avr/io.h>
#include <util/delay.h>
#include "pwm.h"

void pwm_init(void)
{
	

   TCCR0|=(1<<WGM00)|(1<<WGM01)|(1<<COM01)|(1<<CS00)|(1<<CS02);
   
   

   DDRB|=(1<<PB3);
}


void pwm_setduty(unsigned char duty)
{
   OCR0=duty;
}

void pwm_off(void)
{
	 TCCR0 &= 0xCF;
}